package a.e.b.b;

import a.e.b.e;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;

public class u
{
  private List a = new LinkedList();
  private List b = new LinkedList();
  private boolean c;
  private boolean d;
  private final Map e = new HashMap();
  private final e g = new e();
  private final h h = new h();
  static Class i;
  public static int j;
  
  public void a(w paramw)
  {
    if (a.b == 0) {
      if (!this.c)
      {
        this.c = true;
        b();
      }
    }
    this.a.add(paramw);
  }
  
  public void b(w paramw)
  {
    if ((a.b != 0) || (this.a != null)) {
      this.a.remove(paramw);
    }
  }
  
  protected void a(eb parameb)
    throws a
  {
    boolean bool = a.a;
    if (this.a != null)
    {
      Iterator localIterator = new ArrayList(this.a).iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        w localw = (w)localIterator.next();
        localw.a(parameb);
      } while (!bool);
    }
  }
  
  public void a(n paramn)
  {
    if (a.b == 0) {
      if (!this.d)
      {
        this.d = true;
        a();
      }
    }
    this.b.add(0, paramn);
  }
  
  public void b(n paramn)
  {
    if ((a.b != 0) || (this.b != null)) {
      this.b.remove(paramn);
    }
  }
  
  protected void a(cb paramcb)
    throws a
  {
    int k = a.b;
    if (this.b != null)
    {
      Iterator localIterator = new ArrayList(this.b).iterator();
      while ((!paramcb.c()) && ((k != 0) || (localIterator.hasNext())))
      {
        n localn = (n)localIterator.next();
        localn.a(paramcb);
        if (paramcb.c()) {}
      }
    }
  }
  
  protected void a() {}
  
  protected void b() {}
  
  public Object a(t paramt, Node paramNode, Class paramClass)
    throws a
  {
    if (paramNode != null)
    {
      cb localcb = new cb(this, paramt, paramNode, paramClass);
      a(localcb);
      if ((a.b != 0) || (localcb.c())) {
        return localcb.b();
      }
      throw new b("Deserialization of " + paramNode + " not supported!");
    }
    return null;
  }
  
  public Collection a(t paramt, Element paramElement)
    throws a
  {
    LinkedList localLinkedList = new LinkedList();
    eb localeb = new eb(this, paramt, paramElement, localLinkedList);
    a(localeb);
    return localLinkedList;
  }
  
  public void a(Document paramDocument, a.c.q paramq, q paramq1)
    throws a
  {
    paramDocument.normalize();
    t localt = a(paramq);
    new i(this, paramq1).a(localt, paramDocument, paramq);
  }
  
  public void a(InputStream paramInputStream, a.c.q paramq, q paramq1)
    throws a
  {
    DocumentBuilderFactory localDocumentBuilderFactory = DocumentBuilderFactory.newInstance();
    try
    {
      localDocumentBuilderFactory.setNamespaceAware(true);
      DocumentBuilder localDocumentBuilder = localDocumentBuilderFactory.newDocumentBuilder();
      Document localDocument = localDocumentBuilder.parse(paramInputStream);
      a(localDocument, paramq, paramq1);
    }
    catch (ParserConfigurationException localParserConfigurationException)
    {
      throw new a("Cannot instantiate parser !", localParserConfigurationException);
    }
    catch (FactoryConfigurationError localFactoryConfigurationError)
    {
      throw localFactoryConfigurationError;
    }
    catch (SAXException localSAXException)
    {
      throw new a("SAX error: " + localSAXException.getMessage(), localSAXException);
    }
    catch (a locala)
    {
      throw locala;
    }
    catch (IOException localIOException)
    {
      throw new a("IOException :" + localIOException.getMessage(), localIOException);
    }
  }
  
  protected t a(a.c.q paramq)
  {
    a_ locala_ = new a_();
    locala_.a(paramq);
    return locala_;
  }
  
  public void a(Object paramObject1, Object paramObject2)
  {
    this.e.put(paramObject1, paramObject2);
  }
  
  public void a(Object paramObject)
  {
    this.e.remove(paramObject);
  }
  
  public Object b(Object paramObject)
  {
    return this.e.get(paramObject);
  }
  
  public void a(Class paramClass, Object paramObject)
  {
    this.g.a(paramClass, paramObject);
  }
  
  public void a(Class paramClass)
  {
    this.g.c(paramClass);
  }
  
  protected Object b(Class paramClass)
  {
    return this.g.a(paramClass);
  }
  
  public x c()
  {
    return this.h;
  }
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  private final class a_
    implements t
  {
    private a.c.q a;
    private Collection b = new ArrayList(1);
    
    public a_()
    {
      this.b.add(null);
    }
    
    public Object a(Class paramClass)
    {
      if (a.b == 0) {}
      if (paramClass == (u.i == null ? (u.i = u.a("a.e.b.b.h")) : u.i)) {
        return u.this.h;
      }
      return u.this.b(paramClass);
    }
    
    public Collection a()
    {
      return this.b;
    }
    
    public Object b()
    {
      return null;
    }
    
    public x c()
    {
      return u.this.h;
    }
    
    public a.c.q d()
    {
      return this.a;
    }
    
    void a(a.c.q paramq)
    {
      this.a = paramq;
    }
    
    public Object a(Object paramObject)
    {
      return u.this.b(paramObject);
    }
    
    public Object a(t paramt, Node paramNode, Class paramClass)
      throws a
    {
      return u.this.a(paramt, paramNode, paramClass);
    }
    
    public Object a(Node paramNode)
      throws a
    {
      return a(this, paramNode, null);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.b.b.u

 * JD-Core Version:    0.7.0.1

 */